<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>星火饮食，你想要的饮食</title>
<link rel="shortcut icon" href="img/titleicon.ico">
<link rel="stylesheet" type="text/css" href="style/base/baseIndex.css">
<link rel="stylesheet" type="text/css" href="style/customer/index.css">

<!-- liteAccordion css -->
<link href="/js/liteAccordion/css/liteaccordion.css" rel="stylesheet" />

<!-- jQuery -->  
<script type="text/javascript" src="/js/jquery/jquery.js"></script>

<!-- easing -->
<script src="/js/liteAccordion/js/jquery.easing.1.3.js"></script>

<!-- liteAccordion js -->
<script src="/js/liteAccordion/js/liteaccordion.jquery.js"></script>

<!-- 工具类 -->
<script type="text/javascript" src="js/util/objectUtil.js"></script>

<!-- 初始化要调用的函数封装 -->
<script type="text/javascript" src="js/index/loadFunction.js"></script>

<!-- 初始化过程 -->
<script type="text/javascript" src="js/index/load.js"></script>
</head>
<body>
	<div class="index_body_bg" id="body_bg">
		<div class="index_user_info">
        	您好！
            <a href="#">雄哥</a>
            |
            <a href="#">短消息(1)</a>
            |
            <a href="#">安全退出</a>
        </div>
		<div class="index_header_bg">
			<div class="index_logo_bg">我会说我是商标么</div>
			<div class="index_menu_bg">菜单</div>
		</div>
        <div class="index_tuijian_bg">
	        <div class="index_ad_bg">
				<div class="index_ad_left_bg" id="ad_left">
		            <ol>
		                <li>
		                    <h2><span>Slide One</span></h2>
		                    <div>
		                        <img src="/js/liteAccordion/img-demo/1.jpg" alt="image" />
		                    </div>
		                </li>
		                <li>
		                    <h2><span>Slide Two</span></h2>
		                    <div>
		                        <img src="/js/liteAccordion/img-demo/2.jpg" alt="image" />
		                    </div>
		                </li>
		                <li>
		                    <h2><span>Slide Three</span></h2>
		                    <div>
		                        <img src="/js/liteAccordion/img-demo/3.jpg" alt="image" />
		                    </div>
		                </li>
		            </ol>
	            </div>
				<div class="index_ad_right_bg">
	            	<ul class="index_menu_ul">
						<li><a href="#index_admintuijian_bg" id="admintuijian_button">官<br>方<br>推<br>荐</a></li>
						<li><a href="#index_tejia_bg" id="tejia_button">优<br>惠<br>特<br>卖</a></li>
						<li><a href="#index_maidezuiduo_bg" id="maidezuiduo_button">本<br>店<br>热<br>销</a></li>
						<li><a href="#index_shoucang_bg" id="shoucang_button">收<br>藏<br>最<br>多</a></li>
					</ul>
				</div>
	        </div>
            <div id="index_admintuijian_bg">
            	<div class="index_admintuijian_title" id="admintuijian_title">
            		官方推荐
            		<div class="index_pagetop_div">
            			<a href="#" class="index_pagetop_a">页首</a>
            			<a href="#">更多&gt;&gt; </a>
            		</div>
           		</div>
           		<div>
					<ul class="index_admintuijian_ul">
						<c:forEach items="${adminRecommends}" var="adminRecommend">
							<li>
			                    <div>
			                        <div id="admintuijian_extend_id_${adminRecommend.id}" class="index_dish_extend">
			                            <c:if test="${adminRecommend.activity!=null && adminRecommend.discount<10}">
			                            	${adminRecommend.discount}折（${adminRecommend.activity.name}）<br>
			                            </c:if>
			                            <c:if test="${adminRecommend.intro!=null}">${adminRecommend.intro}<br></c:if>
										供应时间：<br>
										<c:if test="${fn:length(adminRecommend.seriesDishProvideTimes)>0}" var="isTimesNotEmpty" scope="request">
											<c:forEach items="${adminRecommend.seriesDishProvideTimes}" var="times">
												${times.daysOfWeek}<br>
												<fmt:formatDate value="${times.startTime}" pattern="HH:mm"/>-<fmt:formatDate value="${times.endTime}" pattern="HH:mm"/>
											</c:forEach>
										</c:if>
										<c:if test="${!isTimesNotEmpty}">暂不供应</c:if>
										<br>
										供应地点：<br>
										<c:if test="${fn:length(adminRecommend.provideAreas)>0}" var="isAreaNotEmpty" scope="request">
				                            <c:forEach items="${adminRecommend.provideAreas}" var="provideArea" varStatus="st">${provideArea.areaName}<c:if test="${!st.last}">,</c:if></c:forEach>
			                            </c:if>
			                            <c:if test="${!isAreaNotEmpty}">暂时没有供应地点</c:if>
			                        </div>
			                        <div id="admintuijian_info_id_${adminRecommend.id}" class="index_dish_info">
										<img width="144px" height="144px" src="img/dishes/${adminRecommend.imageAdd}">
										<br>
										${adminRecommend.name}
										<br>
										<c:if test="${adminRecommend.discount>0}" var="isDiscountValid" scope="request">
											原价：${adminRecommend.price}元/份<br>现价：${adminRecommend.priceDiscounted}元/份</c:if>
										<c:if test="${!isDiscountValid}">
											<br>价格：${adminRecommend.price}元/份<br>
										</c:if>
										<div class="index_order_div">现在订购</div>
									</div>
								</div>
							</li>
						</c:forEach>
					</ul>
				</div>
            </div>
            <div id="index_tejia_bg">
				<div class="index_tejia_title" id="tejia_title">
					优惠特卖
					<div class="index_pagetop_div">
            			<a href="#" class="index_pagetop_a">页首</a>
            			<a href="#">更多&gt;&gt;</a>
            		</div>
				</div>
				<div>
					<ul class="index_admintuijian_ul">
						<c:forEach items="${preferentials}" var="preferential">
							<li>
			                    <div>
			                        <div id="tejia_extend_id_${preferential.id}" class="index_dish_extend">
			                            <c:if test="${preferential.activity!=null && preferential.discount<10}">
			                            	${preferential.discount}折（${preferential.activity.name}）<br>
			                            </c:if>
			                            <c:if test="${preferential.intro!=null}">${preferential.intro}<br></c:if>
										供应时间：<br>
										<c:if test="${fn:length(preferential.seriesDishProvideTimes)>0}" var="isTimesNotEmpty" scope="request">
											<c:forEach items="${preferential.seriesDishProvideTimes}" var="times">
												${times.daysOfWeek}<br>
												<fmt:formatDate value="${times.startTime}" pattern="HH:mm"/>-<fmt:formatDate value="${times.endTime}" pattern="HH:mm"/>
											</c:forEach>
										</c:if>
										<c:if test="${!isTimesNotEmpty}">暂不供应</c:if>
										<br>
										供应地点：<br>
										<c:if test="${fn:length(preferential.provideAreas)>0}" var="isAreaNotEmpty" scope="request">
				                            <c:forEach items="${preferential.provideAreas}" var="provideArea" varStatus="st">${provideArea.areaName}<c:if test="${!st.last}">,</c:if></c:forEach>
			                            </c:if>
			                            <c:if test="${!isAreaNotEmpty}">暂时没有供应地点</c:if>
			                        </div>
			                        <div id="tejia_info_id_${preferential.id}" class="index_dish_info">
										<img width="144px" height="144px" src="img/dishes/${preferential.imageAdd}">
										<br>
										${preferential.name}
										<br>
										<c:if test="${preferential.discount>0}" var="isDiscountValid" scope="request">
											原价：${preferential.price}元/份<br>现价：${preferential.priceDiscounted}元/份</c:if>
										<c:if test="${!isDiscountValid}">
											<br>价格：${preferential.price}元/份<br>
										</c:if>
										<div class="index_order_div">现在订购</div>
									</div>
								</div>
							</li>
						</c:forEach>
					</ul>
				</div>
            </div>
            <div id="index_maidezuiduo_bg">
				<div class="index_maidezuiduo_title" id="maidezuiduo_title">
					本店热销
					<div class="index_pagetop_div">
            			<a href="#" class="index_pagetop_a">页首</a>
            			<a href="#">更多&gt;&gt;</a>
            		</div>
				</div>
				<div>
					<ul class="index_admintuijian_ul">
						<c:forEach items="${hotSells}" var="hotSell">
							<li>
			                    <div>
			                        <div id="maidezuiduo_extend_id_${hotSell.id}" class="index_dish_extend">
			                            <c:if test="${hotSell.activity!=null && hotSell.discount<10}">
			                            	${hotSell.discount}折（${hotSell.activity.name}）<br>
			                            </c:if>
			                            <c:if test="${hotSell.intro!=null}">${hotSell.intro}<br></c:if>
										供应时间：<br>
										<c:if test="${fn:length(hotSell.seriesDishProvideTimes)>0}" var="isTimesNotEmpty" scope="request">
											<c:forEach items="${hotSell.seriesDishProvideTimes}" var="times">
												${times.daysOfWeek}<br>
												<fmt:formatDate value="${times.startTime}" pattern="HH:mm"/>-<fmt:formatDate value="${times.endTime}" pattern="HH:mm"/>
											</c:forEach>
										</c:if>
										<c:if test="${!isTimesNotEmpty}">暂不供应</c:if>
										<br>
										供应地点：<br>
										<c:if test="${fn:length(hotSell.provideAreas)>0}" var="isAreaNotEmpty" scope="request">
				                            <c:forEach items="${hotSell.provideAreas}" var="provideArea" varStatus="st">${provideArea.areaName}<c:if test="${!st.last}">,</c:if></c:forEach>
			                            </c:if>
										<c:if test="${!isAreaNotEmpty}">暂时没有供应地点</c:if>
			                        </div>
			                        <div id="maidezuiduo_info_id_${hotSell.id}" class="index_dish_info">
										<img width="144px" height="144px" src="img/dishes/${hotSell.imageAdd}">
										<br>
										${hotSell.name}
										<br>
										<c:if test="${hotSell.discount>0}" var="isDiscountValid" scope="request">
											原价：${hotSell.price}元/份<br>现价：${hotSell.priceDiscounted}元/份</c:if>
										<c:if test="${!isDiscountValid}">
											<br>价格：${hotSell.price}元/份<br>
										</c:if>
										<div class="index_order_div">现在订购</div>
									</div>
								</div>
							</li>
						</c:forEach>
					</ul>
				</div>
            </div>
            <div id="index_shoucang_bg">
				<div class="index_shoucang_title" id="shoucang_title">
					收藏最多
					<div class="index_pagetop_div">
            			<a href="#" class="index_pagetop_a">页首</a>
            			<a href="#">更多&gt;&gt;</a>
            		</div>
				</div>
				<div>
					<ul class="index_admintuijian_ul">
						<c:forEach items="${collections}" var="collection">
							<li>
			                    <div>
			                        <div id="shoucang_extend_id_${collection.id}" class="index_dish_extend">
			                            <c:if test="${collection.activity!=null && collection.discount<10}">
			                            	${collection.discount}折（${collection.activity.name}）<br>
			                            </c:if>
			                            <c:if test="${collection.intro!=null}">${collection.intro}<br></c:if>
										供应时间：<br>
										<c:if test="${fn:length(collection.seriesDishProvideTimes)>0}" var="isTimesNotEmpty" scope="request">
											<c:forEach items="${collection.seriesDishProvideTimes}" var="times">
												${times.daysOfWeek}<br>
												<fmt:formatDate value="${times.startTime}" pattern="HH:mm"/>-<fmt:formatDate value="${times.endTime}" pattern="HH:mm"/>
											</c:forEach>
										</c:if>
										<c:if test="${!isTimesNotEmpty}">暂不供应</c:if>
										<br>
										供应地点：<br>
										<c:if test="${fn:length(collection.provideAreas)>0}" var="isAreaNotEmpty" scope="request">
				                            <c:forEach items="${collection.provideAreas}" var="provideArea" varStatus="st">${provideArea.areaName}<c:if test="${!st.last}">,</c:if></c:forEach>
			                            </c:if>
			                            <c:if test="${!isAreaNotEmpty}">暂时没有供应地点</c:if>
			                        </div>
			                        <div id="shoucang_info_id_${collection.id}" class="index_dish_info">
										<img width="144px" height="144px" src="img/dishes/${collection.imageAdd}">
										<br>
										${collection.name}
										<br>
										<c:if test="${collection.discount>0}" var="isDiscountValid" scope="request">
											原价：${collection.price}元/份<br>现价：${collection.priceDiscounted}元/份</c:if>
										<c:if test="${!isDiscountValid}">
											<br>价格：${collection.price}元/份<br>
										</c:if>
										<div class="index_order_div">现在订购</div>
									</div>
								</div>
							</li>
						</c:forEach>
					</ul>
				</div>
            </div>
        </div>
        <div class="index_activity_bg">
			<div class="index_ad_zhanwei"></div>
			<div class="index_ac_title">活动公告</div>
			<ul>
				<li><a href="#">中秋节活动</a></li>
			</ul>
		</div>
        <div style="clear: both; float: none;"></div>
	</div>
    <div class="index_footer_bg">本站声明</div>
</body>
</html>